<?php

/**
 * Homework filter form.
 *
 * @package    elearning
 * @subpackage filter
 * @author     Your name here
 */
class HomeworkFormFilter extends BaseHomeworkFormFilter
{
  public function configure()
  {
  	$this->widgetSchema['hw_status'] = new sfWidgetFormChoice(array(
			'choices' => HomeworkPeer::getHomeworkStatusChoices(),
			'expanded' => true,
		));
		
	$this->validatorSchema['hw_status'] = new sfValidatorChoice(array(
					'required'      => false,
					'choices'       => array_keys(HomeworkPeer::getHomeworkStatusChoices()),
			));
  }
 public function getFields()
  {
    return array(
      'id'             => 'Number',
      'level_id'       => 'ForeignKey',
      'teacher_id'     => 'ForeignKey',
      'hw_code'        => 'Text',
      'hw_description' => 'Text',
      'hw_link'        => 'Text',
      'hw_status'      => 'ForeignKey',
      'hw_pulished'    => 'Number',
      'created_at'     => 'Date',
      'updated_at'     => 'Date',
    );
  }
}
